﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="SAWeb.Web.Admin.Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>SAWebCMS管理系统</title>
    <link href="resources/style/css.css" rel="stylesheet" type="text/css" />
    <script src="resources/scripts/jquery.min.js" type="text/javascript"></script>
    <script src="resources/scripts/function.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.alerts.js" type="text/javascript"></script>
    <link href="../Scripts/css/jquery.alerts.css" rel="stylesheet" type="text/css" />
    <link href="../Scripts/css/validationEngine.jquery.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery.validationEngine.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.validationEngine-cn.js" type="text/javascript"></script>
    <script src="../Scripts/comm.js" type="text/javascript"></script>
    <link href="/Scripts/jBox/Skins/Default/jbox.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jBox/i18n/jquery.jBox-zh-CN.js" type="text/javascript"></script>
    <script src="/Scripts/jBox/jquery.jBox-2.3.min.js" type="text/javascript"></script>
    <script type="text/JavaScript">
        //全局代码
        $(function () {
            login_dialog();
            $(window).scroll(function () { login_dialog() });
            $(window).resize(function () { login_dialog() });

            //判断输入框焦点
            if ($("#userName").val() == "") {
                $("#userName").focus();
            } else {
                $("#pwd").focus();
            }

        });

        //表单居中代码
        function login_dialog() {
            var st = document.documentElement.scrollTop; //滚动条距顶部的距离
            var sl = document.documentElement.scrollLeft; //滚动条距左边的距离
            var ch = document.documentElement.clientHeight; //屏幕的高度
            var cw = document.documentElement.clientWidth; //屏幕的宽度
            var objH = $(".login_dialog").height(); //浮动对象的高度
            var objW = $(".login_dialog").width(); //浮动对象的宽度
            var objT = Number(st) + (Number(ch) - Number(objH)) / 2;
            var objL = Number(sl) + (Number(cw) - Number(objW)) / 2;
            $(".login_dialog").css({ top: objT + "px", left: objL + "px" });
        }


        //判断回车键
        $(document).keydown(function (event) {
            if (event.keyCode == 13) {
                $('form').each(function () {
                    return CheckForm();
                });
            }
        }); 

    </script>
    <style type="text/css">
        img, div, input
        {
            behavior: url(/Admin/resources/scripts/iepngfix/iepngfix.htc);
        }
        html, body
        {
            height: 100%;
            background: url(/Admin/resources/style/blue/img/bg_index.gif) bottom repeat-x;
            overflow: hidden;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="MainTop">
        <a href="#" class="MainTopLogo">
            <img src="/Admin/resources/style/img/blue-logo.gif" height="34" /></a>
        <div class="MainTopRight">
            <a href="http://www.csfsta.com/" target="_blank" class="LR">版权所有：ChinaSoft Flagship
                Studio</a>
        </div>
    </div>
    <div class="MainTopBottom">
    </div>
    <div class="login_dialog">
        <div class="top">
            <b>MIS登录</b></div>
        <div class="middle">
            <table width="0" border="0" cellspacing="0" cellpadding="0" class="login_form">
                <tr>
                    <th>
                        用户名
                    </th>
                    <td>
                        <asp:TextBox ID="userName" runat="server" CssClass="ninput  validate[required]"></asp:TextBox>
                    </td>
                    <td>
                        <asp:CheckBox ID="AutoGet" runat="server" OnCheckedChanged="AutoGet_CheckedChanged"
                            AutoPostBack="true" />
                        <label for="remember">
                            记住一周</label>
                    </td>
                </tr>
                <tr>
                    <th>
                        密&nbsp;&nbsp;码
                    </th>
                    <td>
                        <asp:TextBox ID="pwd" runat="server" TextMode="Password" CssClass="ninput validate[required]"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <th>
                        验证码
                    </th>
                    <td colspan="2">
                        <asp:TextBox ID="txtAuthCode" runat="server" CssClass="ninput validate[required]"
                            Width="88"></asp:TextBox>
                        <img id="yanzhengma" src="/Handler/AuthCode.ashx" alt="" onclick="$('#yanzhengma').attr('src', '/Handler/AuthCode.ashx?cc='+ Math.random());"
                            width="70" height="25" />
                        <%--<sap:AuthCode ID="AuthCode1" runat="server" />--%>
                    </td>
                </tr>
            </table>
        </div>
        <div class="bottom">
            <p>
                <asp:LinkButton ID="lbtnLogin" runat="server" CssClass="needCheck NorBtn" OnClick="lbtnLogin_Click"><b>安全登录</b></asp:LinkButton>
            </p>
        </div>
    </div>
    </form>
</body>
</html>
